<template>
  <el-select ref="company" v-model="listQuery.company_id" placeholder="选择出资公司" filterable class="filter-item" style="width:150px;margin-top:8px">
    <el-option label="选择出资公司" value="" />
    <el-option
      v-for="item in owner_company_list"
      :key="item.id"
      :label="item.company_name"
      :value="item.id"
    />
  </el-select>
</template>

<script>
import XLSX from 'xlsx'
import {
  getNodes
} from '@/utils'
import { getOwnerCompanyList } from '@/api/order'
import waves from '@/directive/waves' // waves directive
export default {
  directives: {
    waves
  },

  props: {
    beforeUpload: Function, // eslint-disable-line
    onSuccess: Function// eslint-disable-line
  },
  data() {
    return {
      loading: false,
      nodes: [],
      listQuery: {
        page: 1,
        limit: 10,
        step: 'first',
        real_name: '',
        start: '',
        end: '',
        c_id: '',
        is_settle: '',
        company_id: ''
      },
      listMerchantQuery: {
        page: 1,
        limit: 500
      },
      owner_company_list: [],
      excelData: {
        header: null,
        results: null
      }
    }
  },
  created() {
    this.nodes = getNodes()
    this.getOwnerCompanyList()
  },
  methods: {

    getOwnerCompanyList() {
      getOwnerCompanyList().then(response => {
        this.owner_company_list = response.data
      })
    }
  }
}
</script>

<style scoped>
.excel-upload-input{
  display: none;
  z-index: -9999;
}
.drop{
  border: 2px dashed #bbb;
  width: 600px;
  height: 160px;
  line-height: 160px;
  margin: 0 auto;
  font-size: 24px;
  border-radius: 5px;
  text-align: center;
  color: #bbb;
  position: relative;
}
</style>
